from rest_framework.viewsets import ModelViewSet

from meiduo_admin.serializers.admins import AdminsSerializers
from users.models import User
from meiduo_admin.utils.pagination import MeiduoPagination


class AdminsView(ModelViewSet):
    queryset = User.objects.filter(is_staff=True).order_by('-id')
    serializer_class = AdminsSerializers
    pagination_class = MeiduoPagination
